<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <title>首页</title>
    <style>
        /* 全局样式重置 */
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        ul,
        ol,
        li {
            list-style: none;
        }
        
        a {
            text-decoration: none;
        }
        
        html {
            font-size: 100px;
        }
        
        body {
            font-size: 0.14rem;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        /* 头部样式 */
        
        header {
            display: flex;
            position: fixed;
            width: 100%;
            height: 0.44rem;
            top: 0;
            left: 0;
            background-color: #fff;
            box-shadow: 0 0.02rem 0.05rem rgba(0, 0, 0, 0.1);
            padding: 0 0.15rem;
            z-index: 100;
        }
        
        .header-top {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .logo {
            width: 0.4rem;
            height: 0.4rem;
            background: #ff6700 url('https://cdn.cnbj1.fds.api.mi-img.com/mi-logo/6261692e706e67.png?imageView2/2/w/200') no-repeat center;
            background-size: contain;
        }
        
        .search-box {
            display: flex;
            align-items: center;
            background: #f5f5f5;
            border-radius: 0.2rem;
            height: 0.32rem;
            flex: 1;
            margin: 0 0.15rem;
        }
        
        .search-icon {
            width: 0.18rem;
            height: 0.18rem;
            margin-left: 0.12rem;
            background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M848 684l-196-196c-42-42-106-42-148 0-42 42-42 106 0 148l196 196-96 96c-26 26-60 40-94 40-34 0-68-14-94-40l-240-240c-42-42-42-106 0-148 42-42 106-42 148 0l240 240c26 26 40 60 40 94 0 34-14 68-40 94l96-96zM140 820c-66.2 0-120-53.8-120-120s53.8-120 120-120 120 53.8 120 120-53.8 120-120 120z" fill="%23666"/></svg>') no-repeat center;
            background-size: contain;
        }
        
        .search-input {
            flex: 1;
            height: 100%;
            border: none;
            outline: none;
            background: transparent;
            font-size: 0.14rem;
            color: #333;
            padding: 0 0.1rem;
        }
        
        .user-icon {
            width: 0.4rem;
            height: 0.4rem;
            background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M512 344c-98.6 0-178 79.4-178 178s79.4 178 178 178 178-79.4 178-178-79.4-178-178-178zm0 312c-74.5 0-136-61.5-136-136s61.5-136 136-136 136 61.5 136 136-61.5 136-136 136z" fill="%23666"/></svg>') no-repeat center;
            background-size: contain;
        }
        /* 导航列表样式 */
        
        .nav-list {
            display: flex;
            overflow-x: auto;
            white-space: nowrap;
            margin-top: 0.44rem;
            padding: 0.1rem 0;
            background-color: #fff;
            -webkit-overflow-scrolling: touch;
        }
        
        .nav-list li {
            margin: 0 0.15rem;
        }
        
        .nav-list a {
            color: #333;
            font-size: 0.16rem;
        }
        /* 主体内容样式 */
        
        main {
            display: flex;
            flex-direction: column;
            margin-top: 0.8rem;
            padding: 0 0.15rem;
        }
        
        main .div1 {
            width: 100%;
            margin-bottom: 0.2rem;
        }
        
        main .div1 img {
            width: 100%;
            height: auto;
            object-fit: cover;
        }
        
        main .div2,
        main .div3 {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.2rem;
        }
        
        main .div2 button,
        main .div3 button {
            flex: 1;
            height: 0.32rem;
            margin: 0 0.05rem;
            border: none;
            background-color: #f5f5f5;
            border-radius: 0.04rem;
            font-size: 0.14rem;
            color: #333;
        }
        /* 底部样式 */
        
        footer {
            display: flex;
            position: fixed;
            width: 100%;
            height: 0.5rem;
            bottom: 0;
            left: 0;
            border-top: 0.01rem solid #e0e0e0;
            background-color: #fff;
            align-items: center;
            justify-content: space-around;
            z-index: 100;
        }
        
        footer button {
            border: none;
            background-color: transparent;
            font-size: 0.12rem;
            color: #333;
        }
    </style>
</head>

<body>
    <header>
        <div class="header-top">
            <div class="logo"></div>
            <div class="search-box">
                <span class="search-icon"></span>
                <input type="text" class="search-input" placeholder="搜索商品名称">
            </div>
            <div class="user-icon"></div>
        </div>
    </header>
    <ul class="nav-list">
        <li><a href="#">推荐</a></li>
        <li><a href="#">智能</a></li>
        <li><a href="#">电视</a></li>
        <li><a href="#">家电</a></li>
        <li><a href="#">笔记本</a></li>
    </ul>
    <main>
        <div class="div1">
            <img src="/素材/img/小米轮播图1.jpg" alt="轮播图">
        </div>
        <div class="div2">
            <button type="button">商城</button>
            <button type="button">众筹</button>
            <button type="button">手机</button>
            <button type="button">交换</button>
            <button type="button">上新</button>
        </div>
        <div class="div3">
            <button type="button">智能</button>
            <button type="button">热卖</button>
            <button type="button">电视</button>
            <button type="button">洗衣机</button>
            <button type="button">卡</button>
        </div>
        <div class="div4">
            <section>

            </section>
            <aside>

            </aside>
        </div>
    </main>
    <footer>
        <button class="foot" type="submit">首页</button>
        <button class="foot" type="submit">分类</button>
        <button class="foot" type="submit">米圈</button>
        <button class="foot" type="submit">购物车</button>
        <button class="foot" type="submit">我的</button>
    </footer>
    <script>
        // 动态设置rem（适配375设计稿）
        (function() {
            const designWidth = 375;
            const html = document.documentElement;
            const resize = () => {
                html.style.fontSize = (window.innerWidth / designWidth * 100) + 'px';
            };
            resize();
            window.addEventListener('resize', resize);
        })();
    </script>
</body>

</html>